kind: Suite
apiVersion: test.gatekeeper.sh/v1alpha1
metadata:
  name: d8-allowed-volume-types
tests:
  - name: pod-security-standards-restricted
    template: ../../templates/security/allowed-volume-types.yaml
    constraint: constraint_pss_restricted.yaml
    cases:
      - name: example-allowed
        inventory:
          - ../common/test_samples/ns.yaml
        object: test_samples/pss_restricted/allowed.yaml
        assertions:
          - violations: no
      - name: example-disallowed
        inventory:
          - ../common/test_samples/ns.yaml
        object: test_samples/pss_restricted/disallowed.yaml
        assertions:
          - violations: yes

  - name: security-policy
    template: ../../templates/security/allowed-volume-types.yaml
    constraint: constraint_security_policy.yaml
    cases:
      - name: example-allowed
        inventory:
          - ../common/test_samples/ns.yaml
        object: test_samples/security_policy/allowed.yaml
        assertions:
          - violations: no
